<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('items', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('sector_id')->default(0)->comment('行业id');
            $table->integer('project_id')->default(0)->commemt('项目id');
            $table->integer('company_id')->default(0)->commemt('公司id');
            $table->string('department', 20)->default('')->comment('专业');
            $table->string('title', '50')->default('')->comment('标题');
            $table->integer('publisher_uid')->default(0)->comment('发布者');
            $table->tinyInteger('stage')->default(1)->comment('设计阶段');
            $table->date('expired_at')->comment('过期时间');
            $table->decimal('price')->comment(0)->comment('价格');
            $table->string('image_ids', 100)->default('')->comment('图片ids');
            $table->tinyInteger('status')->default(0)->comment('状态：0无效，1有效中，2结束');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('items');
    }
}
